import request from '../../utils/request'

//登录
export function login(num, password) {
  return request({
    url: '/stu/student/login',
    method: 'post',
    data: {
      num,
      password
    }
  })
}

//根据id查询学生基本信息
export function studentInfoById(id) {
  return request({
    url: `/stu/student/info/${id}`,
    method: 'get',
    params: {}
  })
}

//根据id查询学生详细信息
export function studentDetailInfoById(id) {
  return request({
    url: `/stu/detail/info/${id}`,
    method: 'get',
    params: {}
  })
}

//修改详细信息
export function updateInfo(student) {
  return request({
    url: `/stu/detail/update`,
    method: 'post',
    data: student
  })
}

//修改头像信息
export function updateImg(id, img) {
  return request({
    url: `/stu/student/update`,
    method: 'post',
    data: {
      id,
      img
    }
  })
}
